package com.sevenday.mybottomnagivationviewdemo.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 创建日期：2019/9/25 on 17:27
 * 描述:
 * 作者: Mechanics
 */
public class MyPageAdapter extends FragmentPagerAdapter {

    List<Fragment> list;
    public MyPageAdapter(@NonNull FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.list=list;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
